package Presentation;

import java.net.MalformedURLException;
import java.net.URL;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.TextField;
import javafx.scene.web.WebView;


public class TextFieldURL extends TextField
{
    FenetrePrincipale fp;
    
    
    public TextFieldURL(final FenetrePrincipale fp, int l, int h){
        super("");
        this.setPrefSize(l,h);
        this.fp=fp;
        
        this.setOnAction(new EventHandler<ActionEvent>() {
            @Override 
            public void handle(ActionEvent e) {
                fp.nouvellePage(fp.tfURL.getText());
            }
        });
        
    }
}
